package com.duan.boot.interceptor;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;

import javax.servlet.http.HttpServletRequest;

/**
 * @author duan
 * @date 2022/12/1 19:32
 */
public class TokenUtil {
    public static String getRequestToken(HttpServletRequest httpServletRequest){
        String token = httpServletRequest.getHeader("token");
        if (StringUtils.isBlank(token)){
            token = httpServletRequest.getParameter("token");
        }
        return token;
    }
}
